package com.kaver.sso.dao.service.impl;

import com.kaver.sso.dao.po.SsoDept;
import com.kaver.sso.dao.mapper.SsoDeptMapper;
import com.kaver.sso.dao.service.SsoDeptDao;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 部门 服务实现类
 * </p>
 *
 * @author roc
 * @since 2021-08-06
 */
@Service
public class SsoDeptDaoImpl extends ServiceImpl<SsoDeptMapper, SsoDept> implements SsoDeptDao {

    @Override
    public String queryByDeptId(Long deptId) {
        if (deptId != null) {
            SsoDept dept = this.getById(deptId);
            if (dept != null) {
                return dept.getDeptName();
            }
        }
        return null;
    }

}
